package cn.tedu.spring.config;

import cn.tedu.spring.eg1.product;
import cn.tedu.spring.file.database;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        SpringConfig springConfig = context.getBean(SpringConfig.class);
        product product = context.getBean(product.class);
        System.out.println(product);
        database database = context.getBean(database.class);
        System.out.println(database);
    }
}
